﻿using System.Collections.ObjectModel;
using DeepEarth.Core;
using System.ComponentModel;

namespace DeepEarth.Toolkit.Controls
{
    // An observable collection of a known type to work with TemplateSelectors
    public class DrawnObjectsCollection : ObservableCollection<object>, IItemsContainer, INotifyPropertyChanged
    {
        public System.Collections.IEnumerable Children
        {
            get { return this; }
        }

        public bool IsAtomic
        {
            get { return false; }
        }


        double opacity = 1.0;

        public double Opacity
        {
            get { return opacity; }
            set
            {
                if (opacity != value)
                {
                    opacity = value;
                    OnPropertyChanged(new PropertyChangedEventArgs("Opacity"));
                }
            }
        }

        ActivationCascadeMode acm = ActivationCascadeMode.Activate | ActivationCascadeMode.Deactivate;
        public ActivationCascadeMode ActivationCascade
        {
            get { return acm; }
        }
    }
}